import axios from '@/assets/model/httpconfig/AxiosApi';
import qs from 'qs';
import { WebApi } from '@/assets/model/httpconfig/WebApi';

export namespace system {
	export class imgdir {
		/** 图片目录集合*/
		public selectimagedirlist() {
			return axios({
				url: WebApi.backstagePath + '/system/imagedir/list',
				method: 'post'
			});
		}
		/** 图片目录列表*/
		public selectimagedirpage(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/imagedir/page',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 添加图片目录*/
		public addimagedir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/imagedir/add',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 更新图片目录*/
		public updateimagedir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/imagedir/edit',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 删除图片目录*/
		public deleteimagedir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/imagedir/remove',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
	}
	export class menu {
		/** 菜单分页*/
		public selectmenupage(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/menu/page',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 菜单集合*/
		public selectmenus() {
			return axios({
				url: WebApi.backstagePath + '/system/menu/list',
				method: 'post'
			});
		}
		/** 添加菜单*/
		public addmenu(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/menu/add',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 更新菜单*/
		public updatemenu(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/menu/edit',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 删除菜单*/
		public deletemenu(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/menu/remove',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
	}
	export class notedir {
		/** 笔记目录列表*/
		public selectnotedirpage(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/notedir/page',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 笔记目录集合*/
		public selectnotedirlist() {
			return axios({
				url: WebApi.backstagePath + '/system/notedir/list',
				method: 'post'
			});
		}
		/** 添加笔记目录*/
		public addnotedir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/notedir/add',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 更新笔记目录*/
		public updatenotedir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/notedir/edit',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 删除笔记目录*/
		public deletenotedir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/notedir/remove',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
	}
	export class user {
		/** 用户列表*/
		public selectuserpage(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/user/page',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 新增用户*/
		public adduser(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/user/add',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 更新用户*/
		public updateuser(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/user/edit',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 删除用户*/
		public deleteuser(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/user/remove',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
	}
	export class videodir {
		/** 视频目录列表*/
		public selectvideodirpage(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/videodir/page',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 视频目录集合*/
		public selectvideodirlist() {
			return axios({
				url: WebApi.backstagePath + '/system/videodir/list',
				method: 'post'
			});
		}
		/** 添加视频目录*/
		public addvideodir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/videodir/add',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 更新视频目录*/
		public updatevideodir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/videodir/edit',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
		/** 删除视频目录*/
		public deletevideodir(parameter: any) {
			return axios({
				url: WebApi.backstagePath + '/system/videodir/remove',
				method: 'post',
				data: qs.stringify(parameter)
			});
		}
	}
}
